<template>
	<div>
		<h1>用户中心</h1>
		<el-tabs v-model="activeName" @tab-click="handleClick">
			<el-tab-pane label="用户管理" name="first"  >
				<el-table :data="tableData" style="width: 100%">
					<el-table-column prop="unid" label="unid" width="180">
					</el-table-column>
					<el-table-column prop="username" label="用户名" width="180">
					</el-table-column>
					<el-table-column prop="nickname" label="昵称">
					</el-table-column>
					<el-table-column prop="sex" label="vip等级">
					</el-table-column>
					<el-table-column label="操作" align="center">
						<el-button type="primary">编辑</el-button>
						<el-button type="danger">删除</el-button>
					</el-table-column>
				</el-table>
			</el-tab-pane>
			<el-tab-pane label="配置管理" name="second">配置管理</el-tab-pane>
		</el-tabs>
	</div>
</template>
<script>
import *as api from "@/api/stu"  
export default {
	meta: {
		title: "yhgl",
		icon: "iconfont icon-yonghu",
	},
	data() {
		return {
			activeName: "first",
			tableData:[]
		}
	},
	created(){
        this.users()
    },
	methods: {
		users(){
			api.user()
			.then(res=>{
                console.log(res)
                if(res.data.state){
                   this.tableData=res.data.data; 
                }
            })
		},
		handleClick() {

		}
	}
};
</script>